<!DOCTYPE html>
<html>
    <head>
        {% include head.html %}
    </head>

    <body>
        <header class="head">
            {% include header.html %}
            {% include nav.html %}
        </header>
        {% include search.html %}
        <div class="margin">
            <div class="content full">
                <div class="content-container">
                    <article>
                        {% if page.type == "vimeo" %}
                            {% if page.vimeo-embed %}
                                <div class="video-container">
                                    {{ page.vimeo-embed }}
                                </div>
                            {% endif %}
                        {% elsif page.type == "youtube" %}
                            {% if page.yt-video-id %}
                                <div class="video-container">
                                    <iframe src="https://www.youtube.com/embed/{{page.yt-video-id}}?feature=player_detailpage" allowfullscreen></iframe>
                                </div>
                            {% endif %}
                        {% elsif page.type == "image" or page.type == "gallery" %}
                            {% if page.featimg %}
                                <img class="featimg" src="{{ site.media_folder }}{{ page.featimg }}" alt="{{ page.featimg }}">
                            {% endif %}
                        {% elsif page.type == "audio" %}
                            {% if page.audio-embed %}
                                {{ page.audio-embed }}
                            {% endif %}
                        {% endif %}

                        <h1 class="post-title">
                            {{ page.title }}
                        </h1>
                        <div class="meta">
                            {% include author.html%} &bull;
                            <span class="date">
                                Published on {{ page.date | date: '%B %d, %Y' }}
                            </span>
                        </div>
                        {% if page.type == "standard" %}
                            {% if page.featimg %}
                                <img class="featimg" src="{{ site.media_folder }}{{ page.featimg }}" alt="{{ page.featimg }}">
                            {% endif %}
                        {% endif %}
                        <div class="post-content">
                            {{ content }}
                        </div>
                        {% if page.category or page.tags %}
                        <div class="catsandtags">
                            {% if page.category %}
                            <span class="category">
                                <span class="name">categories:</span>
                                {{ page.categories | category_links }}
                            </span>
                            {% endif %}
                            {% if page.category and page.tags %}
                                &bull;
                            {% endif %}
                            {% if page.tags %}
                            <span class="tags">
                                <span class="name">tags:</span>
                                {% for tag in page.tags %}
                                    <a href="{{ site.tag_dir | prepend: site.baseurl | replace: '//', '/' }}/{{ tag }}">{{ tag }}</a>
                                {% endfor %}
                            </span>
                            {% endif %}
                        </div>
                        {% endif %}
                    </article>
                    <div class="post-nav">
                        {% if page.previous.url %}
                        <a class="btn prev" href="{{ page.previous.url | prepend: site.baseurl | replace: '//', '/' }}"><i class="fa fa-angle-left"></i><span class="short"> prev</span><span class="long">ious post</span></a>
                        {% endif %}
                        {% if page.next.url %}
                        <a class="btn next" href="{{ page.next.url | prepend: site.baseurl | replace: '//', '/' }}"><span class="short">next </span><span class="long">post </span><i class="fa fa-angle-right"></i></a>
                        {% endif %}
                    </div>
                </div>
				{% include comment.html %}
            </div>
        </div>
        {% include footer.html %}
        
    </body>
</html>
